package com.easylinkin.linkappapi.location.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 定位设备表
 *
 * @author JG
 * @since 2023-09-20
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("linkapp_location_device")
public class LinkappLocationDevice implements Serializable {
    private static final long serialVersionUID=1L;

    @TableId(type = IdType.AUTO)
    @TableField(value = "id")
    private Integer id;

    /**
     * 设备编号
     */
    @TableField(value = "device_code_")
    private String deviceCode;

    /**
     * 设备类型: 1-安全帽
     */
    @TableField(value = "device_type_")
    private Integer deviceType;

    /**
     * 标签编号
     */
    @TableField(value = "label_code_")
    private String labelCode;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id_")
    private String tenantId;

    /**
     * 绑定人员id(花名册user_id)
     */
    @TableField(value = "user_id_")
    private String userId;

    /**
     * 绑定时间
     */
    @TableField(value = "bind_time_")
    private Date bindTime;

    /**
     * 电池电量
     */
    @TableField(value = "battery_")
    private Integer battery;

    /**
     * 在线状态：0-离线 1-在线
     */
    @TableField(value = "online_state_")
    private Boolean onlinestate;

    /**
     * 绑定状态：0-未绑定 1-已绑定 2-未生效
     */
    @TableField(value = "bind_state_")
    private Integer bindState;

    /**
     * 是否删除字段 1:存在; 0:删除
     */
    @TableLogic(value = "1", delval = "0")
    @TableField(value = "delete_state_")
    private Boolean deleteState;

    /**
     * 最新上报时间
     */
    @TableField(value = "latest_reporting_time_")
    private Date latestReportingTime;

    /**
     * 佩戴状态：0-脱离 1-穿戴
     */
    @TableField(value = "wearing_state_")
    private Boolean wearingState;

    /**
     * 报警状态：0-未报警 1-已报警
     */
    @TableField(value = "warning_state_")
    private Boolean warningState;

    /**
     * 位置类型：0-室内 1-室外
     */
    @TableField(value = "location_type_")
    private Boolean locationType;

    /**
     * 室内位置
     */
    @TableField(value = "indoor_location_")
    private String indoorLocation;

    /**
     * 高度
     */
    @TableField(value = "height_")
    private Float height;

    /**
     * 经度
     */
    @TableField(value = "longitude_")
    private Float longitude;

    /**
     * 纬度
     */
    @TableField(value = "latitude_")
    private Float latitude;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id_")
    private Long creatorId;

    /**
     * 创建日期
     */
    @TableField(value = "create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField(value = "modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time_")
    private Date modifyTime;

    /**
     * 备注
     */
    @TableField(value = "remark_")
    private String remark;

    /**
     * 定位器在平面图上x轴坐标
     */
    @TableField(value = "x_position_")
    private Float xPosition;

    /**
     * 定位器在平面图上y轴坐标
     */
    @TableField(value = "y_position_")
    private Float yPosition;

    /**
     * 绑定/解绑控制参数 0-解绑 1-绑定
     */
    @TableField(exist = false)
    private Integer bindControl;

    @TableField(exist = false)
    private Set<Integer> ids;

    /**
     * 身份证号
     */
    @TableField(exist = false)
    private String cardNo;

}
